package com.startdima.user.domain.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

@Entity
@Table(name = "user")
@Data
@EqualsAndHashCode(of = "userId", callSuper = false)
@Accessors(chain = true)
public class UserInfo {
	
	/**
	 * 用户主键
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "user_id", nullable = false, unique = true, length = 32)
	private Long userId;
	
	/**
	 * 用户名
	 */
	@Column(name = "username", nullable = false, length = 100)
	private String username;
	
	/**
	 * 用户密码
	 */
	@Column(name = "password", nullable = false, length = 100)
	private String password;
	
	/**
	 * Token
	 */
	@Column(name = "token")
	private String token;

}
